package com.ybkj.o2o.zhuanche.common.transport;

public class Result<T> {

  private int code;

  private String message;

  private T data;

  @Override
  public String toString() {
    return "Result{" +
            "code=" + code +
            ", message='" + message + '\'' +
            ", data=" + data +
            '}';
  }

  /**
   * 封装返回数据格式.
   * @param code 状态码.
   * @param message 信息.
   * @param message 信息.
   * @param data 数据.
   */
  
  public Result(int code, String message, T data) {
    this.code = code;
    this.message = message;
    this.data = data;
  }

  public int getCode() {
    return code;
  }

  public void setCode(int code) {
    this.code = code;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  public T getData() {
    return data;
  }

  public void setData(T data) {
    this.data = data;
  }
}
